package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.OrderProductPhysicalMapper;
import com.qj.yantaishan.domain.OrderProductPhysical;
import com.qj.yantaishan.service.IOrderProductPhysicalService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 门店分配订单商品关系Service业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class OrderProductPhysicalServiceImpl    extends ServiceImpl<OrderProductPhysicalMapper, OrderProductPhysical>  implements IOrderProductPhysicalService
{
    @Autowired
    private OrderProductPhysicalMapper orderProductPhysicalMapper;

    /**
     * 查询门店分配订单商品关系
     * 
     * @param pigcmsId 门店分配订单商品关系主键
     * @return 门店分配订单商品关系
     */
    @Override
    public OrderProductPhysical selectOrderProductPhysicalByPigcmsId(Long pigcmsId)
    {
        return orderProductPhysicalMapper.selectOrderProductPhysicalByPigcmsId(pigcmsId);
    }

    /**
     * 查询门店分配订单商品关系列表
     * 
     * @param orderProductPhysical 门店分配订单商品关系
     * @return 门店分配订单商品关系
     */
    @Override
    public List<OrderProductPhysical> selectOrderProductPhysicalList(OrderProductPhysical orderProductPhysical)
    {
        return orderProductPhysicalMapper.selectOrderProductPhysicalList(orderProductPhysical);
    }

    /**
     * 新增门店分配订单商品关系
     * 
     * @param orderProductPhysical 门店分配订单商品关系
     * @return 结果
     */
    @Override
    public int insertOrderProductPhysical(OrderProductPhysical orderProductPhysical)
    {
        return orderProductPhysicalMapper.insertOrderProductPhysical(orderProductPhysical);
    }

    /**
     * 修改门店分配订单商品关系
     * 
     * @param orderProductPhysical 门店分配订单商品关系
     * @return 结果
     */
    @Override
    public int updateOrderProductPhysical(OrderProductPhysical orderProductPhysical)
    {
        return orderProductPhysicalMapper.updateOrderProductPhysical(orderProductPhysical);
    }

    /**
     * 批量删除门店分配订单商品关系
     * 
     * @param pigcmsIds 需要删除的门店分配订单商品关系主键
     * @return 结果
     */
    @Override
    public int deleteOrderProductPhysicalByPigcmsIds(String pigcmsIds)
    {
        return orderProductPhysicalMapper.deleteOrderProductPhysicalByPigcmsIds(Convert.toStrArray(pigcmsIds));
    }

    /**
     * 删除门店分配订单商品关系信息
     * 
     * @param pigcmsId 门店分配订单商品关系主键
     * @return 结果
     */
    @Override
    public int deleteOrderProductPhysicalByPigcmsId(Long pigcmsId)
    {
        return orderProductPhysicalMapper.deleteOrderProductPhysicalByPigcmsId(pigcmsId);
    }
}
